<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JsUnit Modern UI</title>
    <link rel="stylesheet" type="text/css" href="../css/modernStyle.css">

    <script type="text/javascript">
        JsUnit = top.JsUnit;
        testManager = top.testManager;
        uiManager = testManager.getUiManager();
    </script>
</head>

<body>

<table id="infoPanel">
    <tr>
        <td id="jsLogo">
            <a href="http://www.jsunit.net" target="_blank">
                <img src="../images/logo_jsunit.jpg" title="JsUnit" alt="JsUnit" border="0"/>
            </a>
        </td>

        <td>
        </td>

        <td>
            <span id="ident">
                JsUnit
                <script language="javascript" type="text/javascript">document.write(JsUnit.VERSION);</script>
                Test Runner
            </span>
            <br/>
            <span id="browserInfo">
                Running on
                <script language="javascript" type="text/javascript">document.write(navigator.userAgent);</script>
            </span>
        </td>

        <td id="jsPoweredBy">
            <a href="http://www.jsunit.net/" target="_blank">www.jsunit.net</a>
            <br/>
            <a href="http://tech.groups.yahoo.com/group/jsunit/" target="_blank">JsUnit group</a>
            <br/>
            <a href="http://www.pivotallabs.com/" target="top">
                <img id="pivotalLogo" src="../images/pivotal.gif" alt="Powered By Pivotal Labs" title="Powered By Pivotal Labs">
            </a>
        </td>
    </tr>
</table>

<form name="testRunnerForm" action="">
<script type="text/javascript" language="javascript">
    if (!testManager._params.getTestPage()) { // todo: fix
        document.write("<h4>Enter the location of the Test Page/Test Suite Page to be run:</h4>");
    } else {
        document.write("<br>");
    };
</script>

<table cellpadding="0" cellspacing="0" border="0" summary="Form for entering test case location">
    <tr>
        <td align="center" valign="middle">
            <script language="JavaScript" type="text/javascript">
                if (!testManager._params.getTestPage()) // todo: fix
                    document.write(top.testManager.getTestFileProtocol());
            </script>
        </td>

        <td nowrap align="center" valign="bottom">
            &nbsp;
            <input id="testFileInput" name="testFileName" size="60"/>
            <input id="runButton" type="button" value="Run" onclick="top.startTests()"/>
            <input id="stopButton" type="button" value="Stop" onclick="top.stopTests()"/>

            <script language="JavaScript" type="text/javascript">
                var testPageString = testManager.getTestPageString();
                var testFileInput = document.getElementById("testFileInput");
                testFileInput.value = testPageString;


                var needsUploadField = testManager.isFileProtocol() && testManager.browserSupportsReadingFullPathFromFileField() && testPageString.length == 0;
                var inputType = needsUploadField ? "file" : "text";
                if (needsUploadField) {
                    testFileInput.type = "file";
                }
            </script>
        </td>
    </tr>
</table>

<table width="375" cellpadding="0" cellspacing="0" border="0" summary="Test progress indicator">
    <tr>
        <td width="65" valign="top"><b>Progress:</b></td>

        <td width="300" height="14" valign="middle">
            <table width="300" cellpadding="0" cellspacing="0" border="1" summary="Progress image">
                <tr>
                    <td width="300" height="14" valign="top">
                        <img id="progress" name="progress" height="14" width="0" alt="progress image" src="../images/green.gif">
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>

<br clear="all"/>

<div id="statusDiv"><b>Status:</b> <span id="status">(Idle)</span></div>

<table id="resultsArea">
    <tr>
        <td class="header">
            <div id="countsDiv">
                <b>Runs:</b> <span id="runCount">0</span> &nbsp;
                <b>Errors:</b> <span id="errorCount">0</span> &nbsp;
                <b>Failures:</b> <span id="failureCount">0</span> &nbsp;
                <b>Elapsed:</b> <span id="elapsedTime">0</span>
            </div>
        </td>
        <td class="header">
            <b>Results:</b> <span id="testResultTest"></span>
        </td>
    </tr>

    <tr>
        <td>
            <div id="testsInfo">
                <ul id="testsInfoComplete"></ul>

                <div id="testsInfoCurrent">
                    <div id="testsInfoCurrentSuite"></div>

                    <div id="testsInfoCurrentTest" class="running"></div>
                </div>
            </div>
        </td>
        <td>
            <div id="testResult">
                <div id="testResultDetails"></div>
            </div>
        </td>
    </tr>
</table>

Show:
<input type="button" value="All" onclick="uiManager.showPassed(true);">
<input type="button" value="Only Failures/Errors" onclick="uiManager.showPassed(false);">

</form>



</body>
</html>
